package com.sds.dubbo;

import org.apache.dubbo.common.compiler.Compiler;
import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.container.Main;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * Hello world!
 */
public class DubboMain {
    public static void main(String[] args) throws IOException {
        // 第一种启动方式
        //ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath*:/META-INF/user-provider.xml");
        //context.start();
        //Compiler compiler = ExtensionLoader.getExtensionLoader(Compiler.class).getAdaptiveExtension();
        //System.out.println(compiler.getClass());
        //System.in.read(); //阻塞Main线程
        // 第二种方式
        Main.main(args);
    }
}
